package net.java.nioserver.aio;

import java.nio.channels.SocketChannel;

/**
 * @author Leonid Shlyapnikov
 */
class SelectorChangeRequest {

    private final SocketChannel socketChanel;

    private final Type type;

    private final int ops;

    public SelectorChangeRequest(SocketChannel socketChanel, Type type, int ops) {
        this.socketChanel = socketChanel;
        this.type = type;
        this.ops = ops;
    }

    public SocketChannel socketChannel() {
        return socketChanel;
    }

    public Type type() {
        return type;
    }

    public int ops() {
        return ops;
    }

    public static enum Type {
        REGISTER, CHANGEOPS
    }
}
